package com.zhou.jianzhi.entity.base;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResult<T> {
    // 数据列表
    private List<T> records;

    // 总记录数
    private long total;

    // 当前页码
    private long current;

    // 总页数
    private long pages;

    // 分页大小
    private long size;

    public PageResult(List<T> records, long total, long current, long pages) {
        this.records = records;
        this.total = total;
        this.current = current;
        this.pages = pages;
    }
}
